<template>
  <div id="space" class="space">
    <Login v-if="!isLogin" />
    <UserSpace v-if="isLogin" />
  </div>
</template>

<script>
  import Login from '@/components/home/Login'
  import UserSpace from '@/components/home/UserSpace'

  export default {
    name: 'Space',
    components: { Login, UserSpace },
    data() {
      return {
        isLogin: JSON.parse(localStorage.getItem('user')) ? true : false
      }
    },
  }
</script>

<style scoped>
.space {
  height: 100vh;
  background-color: #36393f;
}
.el-input{
  background-color: #2c2e33;
}
</style>